<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="style/admin.css" />
<link rel="stylesheet" type="text/css" href="style/global.css" />
<title>决策管理</title>
</head>
<?php
	 include 'FusionCharts.php';
	 function getColor(){
	 	for($i=0;$i<6;$i++){
	 		$color = dechex(rand(0,15));
	 		$ret .= $color;
	 	}
	 	
	 	return $ret;
	 }
?>
<body>
	<div id="wrap">
    	<div class="m_head">
        	<div class="m_positin">反馈统计</div>
        </div>
        <div class="qf_box">
            <div class="bh">反馈类型统计</div>
            <div class="bc">
                <div class="fleft">
                    <table class="qf_table" width="90%" border="0" cellpadding="0" cellspacing="1">
                      <tr><th width="30%">反馈类别</th><th width="30">数量</th></tr>
                   <?php 
                   	foreach ($types as $k=>$v){
                   ?>
                      <tr><td><?php echo $v?></td><td><?php echo $feeds[$k]?$feeds[$k]:0?></td></tr>
                   <?php }?>
                    </table>
                </div>
                <div class="fright">
<?php
		//Create an XML data document in a string variable
		$strXML  = "";
		$strXML .= "<graph caption='反馈统计' xAxisName='问卷' yAxisName='次数' decimalPrecision='0' formatNumberScale='0'>";
		if(is_array($types) && count($types)>0){
			foreach ($types as $k=>$v){
				$strXML .= "<set name='".$v."' value='".$feeds[$k]."' color='".getColor()."' />";
			}
		}
		$strXML .= "</graph>";

//Create the chart - Column 3D Chart with data from strXML variable using dataXML method
echo renderChartHTML("/images/FCF_Pie2D.swf", "", $strXML, "myNext", 300, 300);
?>
                </div>
                <div class="clear"></div>
            </div>
        </div>
        <div class="qf_box">
            <div class="bh">处理结果统计</div>
            <div class="bc">
                <div class="fleft">
		    <table class="qf_table" width="90%" border="0" cellpadding="0" cellspacing="1">
                      <tr><th width="30%">处理状态</th><th width="30%">处理数量</th></tr>
                    <?php 
                    	foreach ($states as $k=>$v){
                    ?>
                      <tr><td><?php echo $v?></td><td><?php echo $allstate[$k]?$allstate[$k]:'0'?></td></tr>
                    <?php }?>
                    </table>
                </div>
                <div class="fright">
<?php
		//Create an XML data document in a string variable
		$strXML  = "";
		$strXML .= "<graph caption='反馈统计' xAxisName='问卷' yAxisName='次数' decimalPrecision='0' formatNumberScale='0'>";
		if(is_array($states) && count($states)>0){
			foreach ($states as $k=>$v){
				$strXML .= "<set name='".$v."' value='".$allstate[$k]."' color='".getColor()."' />";
			}
		}
		$strXML .= "</graph>";

//Create the chart - Column 3D Chart with data from strXML variable using dataXML method
echo renderChartHTML("/images/FCF_Pie2D.swf", "", $strXML, "myNext", 300, 300);
?>
                </div>
                <div class="clear"></div>
            </div>
        </div><!--
        <div class="qf_box">
        	<table class="qf_table" width="70%" border="0" cellpadding="0" cellspacing="1">
              <tr><th width="30%" rowspan="2">科室</th><th width="30%" colspan="2">处理结果</th><th width="30%" colspan="2">处理数量</th></tr>
              <tr>
                <th>未处理</th>
                <th>已处理</th>
                <th>未处理数量</th>
                <th>已处理数量</th>
              </tr>
              <tr><td>内科</td><td colspan="2">&nbsp;</td><td colspan="2">&nbsp;</td></tr>
              <tr><td>外科</td><td colspan="2">&nbsp;</td><td colspan="2">&nbsp;</td></tr>
            </table>
        </div>
    --></div>
</body>
</html>

